<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../js/jquery-1.12.4.js">
		</script>
		<style type="text/css">
			*{
				margin: 0px;
				padding: 0px;
			}
			#div1 {
				width: 400px;
				height: 200px;
				border: 1px solid saddlebrown;
			}
			#inh1{
				border: 0px solid saddlebrown;
				text-align: center;
				font-size: 18px;
			}
			#inh2{
				border: 0px solid saddlebrown;
				font-size: 18px;
				text-indent:2em;
			}
		</style>
	</head>

	<body>
		<div id="div1">
			<input type="text" name="" id="inh1" value="" />
			<hr />
			<textarea name="" rows="" cols="" id="inh2"></textarea>
		</div>
		<button onclick="test1()">发帖</button>
		<button onclick="test2()">提交</button>
		<script type="text/javascript">
			function test2(){
				alert(document.getElementById("#inh1").innerHTML);
			}
			var a = document.getElementById("div1").clientWidth;
			$("#inh1").css("width",a-4+"px");
			$("#inh2").css("width",a-4+"px");
			var b = document.getElementById("div1").clientHeight;
			var c = document.getElementById("inh1").clientHeight;
			$("#inh2").css("height",b-4-c+"px");
			//$("#div1").hide();
			function test1() {
				$("#div1").show(1000);
			}
		</script>
	</body>

</html>